<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="../jquerylearn/jquery-1.11.2.min.js"></script>
  <script>

      //in web browser window is the global context
      //this equivalent with window
      console.log(this);//window
      console.log(document===this);//false
      console.log(window)//{...}
      console.log(this === window)//true
      this.a = 'aaa';
      console.log(window.a);//aaa
      console.log(a);//aaa
      function f(){
          this.print1 = function (){
              console.log("hello print");
          }
      }
      f();
      this.print1();
  </script>
</head>
<body>
    <h1>This test</h1>
    <div>
        <p id="id1">test</p>
    </div>
</body>
</html>